﻿using BaiTu.CachingEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaiTu.ICachingServices
{
    /// <summary>
    /// /缓存提供者接口
    /// </summary>
    public interface ICacheProvider
    {
        /// <summary>
        /// 增加数据到缓存
        /// </summary>
        /// <param name="key">key</param>
        /// <param name="value">值</param>
        /// <param name="expireType">过期类型</param>
        /// <param name="increment"></param>
        void Put(string key, object value, CacheExpireType expireType, double increment);
        /// <summary>
        /// 通过key获取值
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        object Get(string key);
        /// <summary>
        /// 通过key移除
        /// </summary>
        /// <param name="key"></param>
        void Remove(string key);
    }
}
